package com.axonactive.yolo.webservice;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;

@Path("/demo")
public class TestWinkResource {

	@GET
    public String getMessage() {
        return "Hello Mr.JackPham !";
    }
	
	@POST
	@Path("/post")
	@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
	@Produces(MediaType.APPLICATION_JSON)
	public String getProfile(MultivaluedMap<String, String> param){
		return param.getFirst("string"); 
	}
}
